<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>数据挖掘-模型管理</title>
    <link rel="stylesheet" href="../frame/layui/css/layui.css">
    <!--<link rel="stylesheet" href="http://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css">-->
    <link rel="stylesheet" href="../frame/static/css/style.css">
    <link rel="stylesheet" href="../frame/codemirror/codemirror.css">
    <link rel="stylesheet" href="../frame/codemirror/show-hint.css">
    <link rel="icon" href="../frame/static/image/code.png">
    <script src="../frame/codemirror/codemirror.js"></script>
    <script src="../frame/codemirror/sql.js"></script>
    <script src="../frame/codemirror/show-hint.js"></script>
    <script src="../frame/codemirror/sql-hint.js"></script>
</head>
<body class="body">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>SQL语句</legend>
    </fieldset>
    <form>
        <textarea name="SQLcode" required lay-verify="required" placeholder="请输入SQL语句..." class="layui-textarea" id="SQLcode">
            if exists (select * from sysdatabases where name='databaseName')
            drop database databaseName
            go
            Create DATABASE databasename
        </textarea><br/>
        <script>
            var editor = CodeMirror.fromTextArea(document.getElementById("SQLcode"), {
                lineNumbers: true,
                matchBrackets: true,
                mode: "text/x-sql",
                indentUnit: 4,
                indentWithTabs: true,
                smartIndent: true,
                extraKeys: {"Ctrl": "autocomplete"},
                showCursorWhenSelecting:true,
            });
        </script>
        <span style="color:#DCDCDC">*&nbsp;Ctrl键开启代码提示功能</span>
        <div style="float: right">
            <button class="layui-btn layui-btn-warm">重置</button>
            <button class="layui-btn mgl-20">查询</button>
        </div>
    </form>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>查询结果</legend>
    </fieldset>
    <div>
        <table class="layui-table" lay-skin="row">
            <thead>
            <tr><th>deviceCount</th><th>dataCount</th><th>usualDataCount</th><th>usualDataRate</th></tr></thead>
            <tbody>
            <tr><td>"pressure":10</td><td>"pressure":34</td><td>"pressure":34</td><td>"pressure":80%</td></tr>
            <tr><td>"temperature":10</td><td>"temperature":41</td><td>"temperature":41</td><td>"temperature":100%</td></tr>
            <tr><td>"humidity":10</td><td>"humidity":54</td><td>"humidity":54</td><td>"humidity":80%</td></tr>
            <tr><td>"deformation":10</td><td>"deformation":48</td><td>"deformation":48</td><td>"deformation":100%</td></tr>
            <tr><td>"velocity":10</td><td>"velocity":65</td><td>"velocity":65</td><td>"velocity":80%</td></tr>
            <tr><td>"light":10</td><td>"light":72</td><td>"light":72</td><td>"light":100%</td></tr>
            </tbody>
        </table>
    </div>
</body>
</html>